<?php if(!IS_AJAX){?>
<include file="Public:header" />
<div class="row">
  <div class="col-sm-7 col-md-8 col-lg-9">
    <section class="panel">
      <div class="panel-body">
        <table class="table-bordered table" width="100%" border="0" cellspacing="0" cellpadding="0">
          <thead>
            <tr>
              <td align="center">ID</td>
              <td align="center">代理级别名称</td>
              <td align="center">折扣率</td>
              <td align="center">操作</td>
            </tr>
          </thead>
          <tbody class="ajaxdatalist" id="ajaxdatalist">
            <?php }?>
            <?php if(IS_AJAX){?>
            <!-- 数据主体 -->
            <notempty name="list">
              <volist name="list" id="vo">
                <tr class="data_list" id="ajaxdatalist-{$vo.id}">
                  <td align="center"><input type="checkbox" value="{$vo.id}" id="id{$vo.id}" class="sall" name="id">
                    {$vo.id}</td>
                  <td><span class="ajaxText" tablename="Agentlevel" field="title" id="{$vo.id}" val="{$vo.title}">{$vo.title}</span></td>
                  <td class="Agentleveldiscount"><span class="ajaxText" tablename="Agentlevel" field="discount" id="{$vo.id}" val="{$vo.discount}">{$vo.discount}</span>%</td>
                  <td align="center"><a rel="{:U('edit',array('id'=>$vo['id']))}" title="编辑产品" class="OptionBtn" href="javascript:void(0);" width="600">编辑</a> | <a data-id="{$vo.id}" class="deleteBtn" rel="{:U('delete',array('id'=>$vo['id']))}" href="javascript:void(0);">删除</a></td>
                </tr>
              </volist>
              <else/>
              <tr>
                <td colspan="4" align="center">暂无信息</td>
              </tr>
            </notempty>
            <?php }?>
            <!-- 数据主体结束 -->
            
            <?php if(!IS_AJAX){?>
          </tbody>
        </table>
        <div id="ajaxdatalistpages"></div>
      </div>
    </section>
  </div>
  <div class="col-sm-5 col-md-4 col-lg-3">
    <div class="states-info">
      <div class="panel green-bg">
        <div class="panel-body">
          <div class="row">
            <div class="col-xs-3"> <i class="fa fa-hand-o-right"></i> </div>
            <div class="col-xs-7">
              <h4>添加级别</h4>
              <span class="state-title"> <a class="text-success" href="##" onClick="_openWindow('<?php echo U('add');?>', 500, '添加代理级别', '保存', function(){ $('#ajaxdatalistform').submit();}, '');">点击这里添加级别</a> </span> </div>
            <div class="col-xs-2"> <span class="fa fa-angle-right"></span> </div>
          </div>
        </div>
      </div>
    </div>
    <div class="panel">
      <header class="panel-heading"> 搜索 </header>
      <div class="panel-body">
        <form id="ajaxdatalistform">
          <div class="input-group m-bot15">
            <input type="text" name="keywords" class="form-control">
            <span class="input-group-btn">
            <button type="button" onClick="$('#ajaxdatalistform').trigger('submit');" class="btn btn-default"><i class="fa fa-search"></i></button>
            </span> </div>
        </form>
      </div>
    </div>
  </div>
</div>
<include file="Public:footer" />
<style>
    .option a.btn{margin-top:5px;}
</style>
</body></html><?php }?>